<?php
/**
 * 后台管理 入口
 *
 * $Id:  admin.php 2013-9-2  下午10:53:40 zhangzw $
 */

define('IN_ADMINCP', TRUE);
define('NOROBOT', TRUE);
define('ADMINSCRIPT', basename(__FILE__));
define('APPTYPEID', 0);
define('CURSCRIPT', 'admin');
define('CURCONFIG', 1);

/**
 * @see famous_core
 */
require './source/class/class_core.php'; 

require './source/function/function_misc.php';

$famous = & famous_core::instance();
$famous->init();

$modarray = array('login', 'index', 'game', 'order', 'member', 'system');
$mod = isset($_G['mod']) && in_array($_G['mod'], $modarray) ? $_G['mod'] : $modarray[0];


// 检查动作名的合法性
if (empty($_G['action']) || !preg_match('/^[a-zA-Z]+$/', $_G['action'])) { 
	showmessage('undefined_action', dreferer());
}

$action = $_G['action'];

require libfile('class/admincp');
require libfile('admincp/'.$mod);

